function [ptptP0, ptptptP0]=partialp0(m,v,x,K)

f2 = @(y)  (  (m-log(y/x)).^2  +  v^2*(m-log(y/x))  - v^2) /v^4/x^2;

f3 = @(y) -(  v^2+m-log(y/x)  )  .*  (  (m-log(y/x)).^2  +  2*v^2*(m-log(y/x))  -  3*v^2  )/v^6/x^3;

ptptP0 = quadgk(@(y) max(y-K,0).*f2(y).*lognpdf(y/x,m,v)/x,-Inf, Inf,'AbsTol',1e-12,'RelTol',1e-12);
ptptptP0 = quadgk(@(y) max(y-K,0).*f3(y).*lognpdf(y/x,m,v)/x,-Inf, Inf,'AbsTol',1e-12,'RelTol',1e-12);
